package cn.johnyu.base.service.impl;

import cn.johnyu.base.dao.PublisherDao;
import cn.johnyu.base.model.Publisher;
import cn.johnyu.base.service.ShopService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Slf4j
public class ShopServiceImpl implements ShopService{
    @Autowired
    private PublisherDao publisherDao;
    @Override
    public List<Publisher> publishers() {
        return null;
    }
//    @Transactional
    @Override
    public Publisher getPublisherById(Integer id) {
        log.info("working................");
        Publisher p1 = publisherDao.findById(id);
        Publisher p2 = publisherDao.findById(id);
        System.out.println(p1==p2);
        return publisherDao.findById(id);
    }

    @Override
    public void addPublisher(Publisher publisher) {

    }
}
